Precondition Generation for a Java Subset

نویسنده

  • Nicole Rauch
چکیده

In order to achieve a better software quality, it is an interesting aspect to verify the correctness of a program at the source code level with respect to a given specification. We are currently developing an interactive verification system called Jive [7] which operates on a Java subset using a Hoare-style programming logic. It is very tedious to verify each and every line of the code to be examined in a separate step, even for those code parts that are straightforward to handle. Thus it is desirable that larger pieces of code can be verified automatically. This can be achieved by using a predicate transformer. It can handle a code sequence by generating a precondition for each element of the sequence, starting with a given postcondition. If it can be shown that a given precondition implies the one generated for the whole sequence, the code indeed satisfies its specification. This paper presents a predicate transformer called “practical weak precondition transformation” (pwp) which operates on the statements of a sequential Java subset called Java-KE. This subset covers object-oriented features like dynamic method binding and exceptions. References, recursion and iteration are supported as well. Details of the embedding of the pwp predicate transformer into our verification tool Jive are given in [12]. Predicate transformers have been examined in detail in the literature. Many other papers deal with aspects like modelling the object store or handling exceptions. This paper puts these pieces together and presents a predicate transformer that adapts parts of these different approaches to our Java subset and integrates them into the formal setting used in Jive.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Predicate Transformation as a Proof Strategy

A verification strategy implementing precondition generation is presented. It automatically constructs a weak precondition for the statements of a Java subset. The strategy uses the rules of an underlying Hoare logic.

متن کامل

Assertion-based Loop Invariant Generation

Many automated techniques for invariant generation are based on the idea that the invariant should show that something “bad” will not happen in the analyzed program. In this article we present an algorithm for loop invariant generation in programs with assertions using a weakest precondition calculus. We have realized the algorithm in the extended static checker ESC/Java2. Challenges stemming f...

متن کامل

Weakest Precondition Semantics for OO Programs: A Separation Logic Approach

For the object oriented paradigm, providing a relatively rich model language equipped with formal semantics for practical reasoning is an important and long-standing open problem. In this work, μJava, a sufficient large subset of sequential Java is defined. An OO Separation Logic with pure reference semantic model is developed. Facilitated by this logic, the Weakest Precondition (WP) semantics ...

متن کامل

Using Aspect-oriented Programming to Instrument Ocl Contracts in Java

Analysis and design by contract allows the definitions of a formal agreement between a class and its clients, expressing each party’s rights and obligations. Contracts written in the Object-Constraint Language (OCL) are known to be a useful technique to specify the precondition and postcondition of operations and class invariants in a UML context, making the definition of object-oriented analys...

متن کامل

Towards Verifying Java Realizations of Ocl-constrained Design Models Using Jml

The Object Constraint Language OCL is a formal textual notation that could be used for placing constraints on the modelling elements that occur in UML diagrams. Constraints include invariants on classes and types, and preconditions and postconditions of operations. OCL was designed to be used in conjunctions with UML diagrams resulting in more precise object-oriented designs. The Java Modelling...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2002